package com.bw.liuyushan.mykotlin_firstmvptest.Adapter

import android.app.FragmentManager
import androidx.fragment.app.Fragment
import androidx.lifecycle.Lifecycle
import androidx.viewpager2.adapter.FragmentStateAdapter

/**
 *MyKotlin_FirstMVPTest
 *file name is : FragmentAdapter
 *created by Ender on 2021/9/15 17:25.
 *author : 刘雨杉
 *Describe:
 */
class FragmentAdapter(f: androidx.fragment.app.FragmentManager,lifecycle: Lifecycle) : FragmentStateAdapter(f,lifecycle){
    lateinit var array: ArrayList<Fragment>



    override fun getItemCount(): Int {
        return array.size
    }

    override fun createFragment(position: Int): Fragment {
        return array.get(position)
    }




}